<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/axios.js" ></script>
	</head>
	<body>
		<input type="button" name="" id="" value="set请求"  class="set"/>
		<input type="button" name="" id="" value="get请求"  class="get"/>
		<input type="button" name="" id="" value="post请求"  class="post"/>
			
		
		
	</script>
	</body>
	<script type="text/javascript">
		document.querySelector(".get").onclick = function(){
			axios.get("https://autumnfish.cn/api/joke/list?num=6")
			.then(function(response){
				console.log(response);
			},function(err){
				console.log(err);
			})
		}
		
		document.querySelector(".set").onclick = function(){
			axios.get("http://musicapi.leanapp.cn/search/suggest？keywords")
			.then(function(response){
				console.log(response);
			},function(err){
				console.log(err);
			})
		}
		
		document.querySelector(".post").onclick = function(){
			axios.post("https://autumnfish.cn/api/user/reg",{username:"wwww"})
			.then(function(response){
				console.log(response);
			},function(err){
				console.log(err);
			})
		}
	</script>
</html>
